import {config, request} from 'utils'

const {api} = config
const {chart} = api

export function fake_chart_data (params) {
  return request({
    url: chart + '/fake_chart_data',
    method: 'get',
    data: params,
  })
}

export function platformSaleStatData (params) {
  return request({
    url: chart + '/platformSaleStatData',
    method: 'get',
    data: params,
  })
}

export function platformStatData (params) {
  return request({
    url: chart + '/platformStatData',
    method: 'get',
    data: params,
  })
}

export function saleLineData (params) {
  return request({
    url: chart + '/saleLineData',
    method: 'get',
    data: params,
  })
}

export function getSaleRankings (params) {
  return request({
    url: chart + '/empSaleRankings',
    method: 'get',
    data: params,
  })
}

export async function chinaGeo () {
  return request({
    url: '/public/chinaGeo.json',
    method: 'get',
  })
}

export async function mapdata (params) {
  return request({
    url: chart + '/mapdata',
    method: 'get',
    data: params,
  })
}
